home *** CD-ROM | disk | FTP | other *** search
/ Hackers Underworld 2: Forbidden Knowledge / Hackers Underworld 2: Forbidden Knowledge.iso / VIRUS / IBMPAPER < prev    next >
Text File  |  1989-04-12  |  87KB  |  2,377 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.           Coping with Computer Viruses and Related Problems
  8.  
  9.           Steve R. White
  10.           David M. Chess
  11.           IBM Thomas J. Watson Research Center
  12.           Yorktown Heights, NY
  13.  
  14.           Chengi Jimmy Kuo
  15.           IBM Los Angeles Scientific Center
  16.           Los Angeles, CA
  17.  
  18.           Research Report (RC 14405)
  19.           January 30, 1989
  20.  
  21.  
  22.  
  23.           This research report is provided without restriction;
  24.           we encourage its redistribution.
  25.  
  26.  
  27.  
  28.  
  29.  
  30.           Copies may be requested from:
  31.  
  32.           IBM Thomas J. Watson Research Center
  33.           Distribution Services F-11 Stormytown
  34.           Post Office Box 218
  35.           Yorktown Heights, New York 10598
  36.  
  37.           (This report will be available from this address up to
  38.            one year after the IBM publication date (up to Jan 1990))
  39.  
  40.  
  41.           This online version differs from the hardcopy report only
  42.           in pagination, and in using *asterisks* for emphasis.  It
  43.           is formatted to print at 66 lines per page, and 80 or so
  44.           characters per line (including a 10 character margin on
  45.           either side).
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64.  
  65.  
  66.  
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79.  
  80.  
  81.  
  82.                      Coping with Computer Viruses and Related Problems
  83.  
  84.  
  85.  
  86.  
  87.  
  88.  
  89.  
  90.  
  91.  
  92.  
  93.                                                         Steve R. White
  94.                                                         David M. Chess
  95.                                   IBM Thomas J. Watson Research Center
  96.                                                   Yorktown Heights, NY
  97.  
  98.                                                       Chengi Jimmy Kuo
  99.                                      IBM Los Angeles Scientific Center
  100.                                                        Los Angeles, CA
  101.  
  102.  
  103.  
  104.  
  105.  
  106.                                        Research Report Number RC 14405
  107.  
  108.                                                       January 30, 1989
  109.  
  110.  
  111.  
  112.  
  113.  
  114.  
  115.  
  116.  
  117.  
  118.  
  119.  
  120.  
  121.  
  122.  
  123.  
  124.  
  125.  
  126.  
  127.  
  128.  
  129.  
  130.  
  131.  
  132.  
  133.  
  134.  
  135.  
  136.  
  137.  
  138.  
  139.           ABSTRACT
  140.  
  141.  
  142.  
  143.           We discuss computer viruses and related problems.  Our
  144.           intent is to help both executive and technical managers
  145.           understand the problems that viruses pose, and to suggest
  146.           practical steps they can take to help protect their
  147.           computing systems.
  148.  
  149.  
  150.  
  151.  
  152.  
  153.  
  154.  
  155.  
  156.  
  157.  
  158.  
  159.  
  160.  
  161.  
  162.  
  163.  
  164.  
  165.  
  166.  
  167.  
  168.  
  169.  
  170.  
  171.  
  172.  
  173.  
  174.  
  175.  
  176.  
  177.  
  178.  
  179.  
  180.  
  181.  
  182.  
  183.  
  184.  
  185.  
  186.  
  187.  
  188.  
  189.  
  190.  
  191.  
  192.  
  193.  
  194.  
  195.           Abstract                                                  ii
  196.  
  197.  
  198.  
  199.  
  200.  
  201.  
  202.  
  203.  
  204.  
  205.           CONTENTS
  206.  
  207.  
  208.  
  209.           1.0  Executive Summary   . . . . . . . . . . . . . . . . . 1
  210.           1.1  What Is a Computer Virus?   . . . . . . . . . . . . . 1
  211.           1.2  How Can Computer Viruses Affect an Organization?  . . 2
  212.           1.3  How Serious Is The Problem?   . . . . . . . . . . . . 2
  213.           1.4  Summary and Recommendations   . . . . . . . . . . . . 3
  214.  
  215.           2.0  Coping with Computer Viruses: A Guide for Technical
  216.            Management  . . . . . . . . . . . . . . . . . . . . . . . 5
  217.           2.1  How Viruses Infect Computing Systems  . . . . . . . . 5
  218.           2.2  How Viruses Differ From Other Security Threats  . . . 6
  219.           2.3  General Security Policies   . . . . . . . . . . . . . 7
  220.             2.3.1  User Education  . . . . . . . . . . . . . . . . . 7
  221.             2.3.2  Backups   . . . . . . . . . . . . . . . . . . . . 7
  222.           2.4  Decreasing the Risk of Viral Infection  . . . . . . . 8
  223.             2.4.1  Isolated Systems  . . . . . . . . . . . . . . . . 8
  224.             2.4.2  Limited-Function Systems  . . . . . . . . . . . . 9
  225.             2.4.3  Policies for Software Repositories  . . . . . .  10
  226.             2.4.4  Policies for Production Systems   . . . . . . .  11
  227.           2.5  Detecting Viral Infections  . . . . . . . . . . . .  12
  228.             2.5.1  Watching for Unexpected Things Happening  . . .  13
  229.             2.5.2  Some Symptoms of Known Viruses  . . . . . . . .  13
  230.             2.5.3  Watching for Changes to Executable Objects  . .  15
  231.             2.5.4  Using External Information Sources  . . . . . .  17
  232.           2.6  Containing Viral Infections   . . . . . . . . . . .  17
  233.             2.6.1  The Importance of Early Detection   . . . . . .  17
  234.             2.6.2  The Importance of Rapid Action  . . . . . . . .  18
  235.           2.7  Recovering from Viral Infections  . . . . . . . . .  19
  236.             2.7.1  Restoration and Backups   . . . . . . . . . . .  19
  237.             2.7.2  Virus-Removing Programs   . . . . . . . . . . .  20
  238.             2.7.3  Watching for Re-Infection   . . . . . . . . . .  20
  239.           2.8  Summary and Recommendations   . . . . . . . . . . .  21
  240.  
  241.           For Further Reading  . . . . . . . . . . . . . . . . . .  23
  242.  
  243.           Glossary   . . . . . . . . . . . . . . . . . . . . . . .  24
  244.  
  245.           Appendix: Viral Infections in PC-DOS   . . . . . . . . .  27
  246.  
  247.  
  248.  
  249.  
  250.  
  251.  
  252.  
  253.  
  254.  
  255.  
  256.  
  257.  
  258.  
  259.  
  260.  
  261.           Contents                                                 iii
  262.  
  263.  
  264.  
  265.  
  266.  
  267.  
  268.  
  269.  
  270.  
  271.           PREFACE
  272.  
  273.  
  274.  
  275.           While this document has been widely reviewed, and many
  276.           helpful suggestions have been incorporated, the authors are
  277.           entirely responsible for its present content.  It does not
  278.           represent the opinions, policies, or recommendations of IBM
  279.           or any other organization.
  280.  
  281.  
  282.  
  283.  
  284.  
  285.  
  286.  
  287.  
  288.  
  289.  
  290.  
  291.  
  292.  
  293.  
  294.  
  295.  
  296.  
  297.  
  298.  
  299.  
  300.  
  301.  
  302.  
  303.  
  304.  
  305.  
  306.  
  307.  
  308.  
  309.  
  310.  
  311.  
  312.  
  313.  
  314.  
  315.  
  316.  
  317.  
  318.  
  319.  
  320.  
  321.  
  322.  
  323.  
  324.  
  325.  
  326.  
  327.           Preface                                                   iv
  328.  
  329.  
  330.  
  331.  
  332.  
  333.  
  334.  
  335.  
  336.  
  337.           1.0  EXECUTIVE SUMMARY
  338.  
  339.  
  340.  
  341.           Computer viruses present a relatively new kind of security
  342.           problem in computing systems.  The purpose of this section
  343.           is to acquaint the senior management of an organization with
  344.           the nature of the problem.  It also outlines some of the
  345.           steps that can be taken to reduce the organization's risk
  346.           from computer viruses and other, similar, problems.
  347.  
  348.           Traditional computer security measures are helpful, but new
  349.           measures are needed to deal with the problems effectively.
  350.           The computer security management of the organization will
  351.           play a key role in reducing the risk.  But education and
  352.           ongoing participation of the users are also vital.
  353.  
  354.  
  355.  
  356.  
  357.           1.1  WHAT IS A COMPUTER VIRUS?
  358.  
  359.  
  360.           A computer virus is one kind of threat to the security and
  361.           integrity of computer systems.  Like other threats, a
  362.           computer virus can cause the loss or alteration of programs
  363.           or data, and can compromise their confidentiality.  Unlike
  364.           many other threats, a computer virus can spread from program
  365.           to program, and from system to system, without direct human
  366.           intervention.
  367.  
  368.           The essential component of a virus is a set of instructions
  369.           which, when executed, spreads itself to other, previously
  370.           unaffected, programs or files.  A typical computer virus
  371.           performs two functions.  First, it copies itself into
  372.           previously-uninfected programs or files.  Second, (perhaps
  373.           after a specific number of executions, or on a specific
  374.           date) it executes whatever other instructions the virus
  375.           author included in it.  Depending on the motives of the
  376.           virus author, these instructions can do anything at all,
  377.           including displaying a message, erasing files or subtly
  378.           altering stored data.  In some cases, a virus may contain no
  379.           intentionally harmful or disruptive instructions at all.
  380.           Instead, it may cause damage by replicating itself and
  381.           taking up scarce resources, such as disk space, CPU time, or
  382.           network connections.
  383.  
  384.           There are several problems similar to computer viruses.
  385.           They too have colorful names:  worms, bacteria, rabbits, and
  386.           so on.  Definitions of them are given in the glossary.  Each
  387.           shares the property of replicating itself within the
  388.           computing system.  This is the property on which we will
  389.           focus, using viruses as an example.  There are also a
  390.           variety of security issues other than viruses.  Here, we
  391.  
  392.  
  393.           Executive Summary                                          1
  394.  
  395.  
  396.  
  397.  
  398.  
  399.  
  400.  
  401.  
  402.  
  403.           will deal only with viruses and related problems, since new
  404.           measures are required to deal with them effectively.
  405.  
  406.  
  407.  
  408.           1.2  HOW CAN COMPUTER VIRUSES AFFECT AN ORGANIZATION?
  409.  
  410.  
  411.           Let us examine a particular sequence of events, by which a
  412.           virus could enter an organization and spread within it.
  413.           Suppose that the organization hires an outside person to
  414.           come in and perform some work.  Part of that person's work
  415.           involves working on one of the organization's personal
  416.           computers.  The person brings in a few programs to aid in
  417.           this work, such as a favorite text editor.
  418.  
  419.           Without the person having realized it, the text editor may
  420.           be infected with a virus.  Using that editor on one of the
  421.           organization's machines causes the virus to spread from the
  422.           editor to one of the programs stored on the organization's
  423.           machine, perhaps to a spreadsheet program.  The virus has
  424.           now entered the organization.
  425.  
  426.           Even when the outside person leaves, the virus remains on
  427.           the machine that it infected, in the spreadsheet program.
  428.           When an employee uses that spreadsheet subsequently, the
  429.           virus can spread to another program, perhaps to a directory
  430.           listing program that the employee keeps on the same floppy
  431.           disk as the spreadsheet data files.  The listing program is
  432.           then infected, and the infection can be spread to other
  433.           computers to which this floppy disk is taken.  If the
  434.           employee's personal computer is connected to the
  435.           organization's network, the employee may send the listing
  436.           program to another user over the network.  In either case,
  437.           the virus can spread to more users, and more machines, via
  438.           floppy disks or networks.  Each copy of the virus can make
  439.           multiple copies of itself, and can infect any program to
  440.           which it has access.  As a result, the virus may be able to
  441.           spread throughout the organization in a relatively short
  442.           time.
  443.  
  444.           Each of the infected programs in each of the infected
  445.           machines can execute whatever other instructions the virus
  446.           author intended.  If these instructions are harmful or
  447.           disruptive, the pervasiveness of the virus may cause the
  448.           harm to be widespread.
  449.  
  450.  
  451.  
  452.           1.3  HOW SERIOUS IS THE PROBLEM?
  453.  
  454.  
  455.           Traditional security measures have attempted to limit the
  456.           number of security incidents to an acceptable level.  A
  457.  
  458.  
  459.           Executive Summary                                          2
  460.  
  461.  
  462.  
  463.  
  464.  
  465.  
  466.  
  467.  
  468.  
  469.           single incident of lost files in a year may be an acceptable
  470.           loss, for instance.  While this is important, it only
  471.           addresses part of the problem of viruses.  Since a single
  472.           virus may be able to  spread throughout an organization, the
  473.           damage that it could cause may be much greater than what
  474.           could be caused by any individual computer user.
  475.  
  476.           Limiting the number of initial viral infections of an
  477.           organization is important, but it is often not feasible to
  478.           prevent them entirely.  As a result, it is important to be
  479.           able to deal with them when they occur.
  480.  
  481.           Most actual viruses discovered to date have either been
  482.           relatively benign, or spread rather slowly.  The actual
  483.           damage that they have caused has been limited accordingly.
  484.           In some cases, though, thousands of machines have been
  485.           affected.  Viruses can easily be created which are much less
  486.           benign.  Their *potential* damage is indeed large.
  487.           Organizations should evaluate their vulnerability to this
  488.           new threat, and take actions to limit their risks.
  489.  
  490.  
  491.  
  492.  
  493.           1.4  SUMMARY AND RECOMMENDATIONS
  494.  
  495.  
  496.           o   A computer virus is a program that can infect other
  497.               programs by modifying them to include a copy of itself.
  498.               When the infected programs are executed, the virus
  499.               spreads itself to still other programs.
  500.  
  501.           o   Viruses can spread rapidly in a network or computing
  502.               system and can cause widespread damage.
  503.  
  504.           o   Unlike many other security threats, viruses can enter a
  505.               given computing system without anyone intending them to.
  506.  
  507.  
  508.           o   There are no known ways to make a general computing
  509.               system completely immune from viral attacks, but there
  510.               are steps you can take to decrease the risks:
  511.  
  512.               -   Use good general security practices.  (For a more
  513.                   complete discussion of these points, and some
  514.                   examples of others, see reference (6).)
  515.  
  516.                   --  Keep good backups of critical data and programs.
  517.                   --  Periodically review overall controls to
  518.                       determine weaknesses.
  519.                   --  Use access control facilities to limit access to
  520.                       information by users, consistent with their job
  521.                       duties and management policies.  Audit accesses
  522.                       that do occur.
  523.  
  524.  
  525.           Executive Summary                                          3
  526.  
  527.  
  528.  
  529.  
  530.  
  531.  
  532.  
  533.  
  534.  
  535.                   --  Do not use network connections to outside
  536.                       organizations without a mutual review of
  537.                       security practices.
  538.                   --  Consider limiting electronic mail communications
  539.                       to non-executable files.  Separate
  540.                       communications that must move executable files
  541.                       from electronic mail, so that they can be
  542.                       separately controlled.
  543.                   --  Make security education a prerequisite to any
  544.                       computer use.
  545.  
  546.               -   Put a knowledgeable group in place to deal with
  547.                   virus incidents.
  548.  
  549.                   --  The group may be a formal part of the
  550.                       organization, or may be an informal collection
  551.                       of knowledgeable people.
  552.  
  553.                   --  The group should be responsible for educating
  554.                       users about the threat of viruses, providing
  555.                       accurate information about viruses, responding
  556.                       to reports of viruses, and dealing with viral
  557.                       infections when they occur.
  558.  
  559.                   --  Make sure each employee who works with a
  560.                       computer knows how to contact this group if they
  561.                       suspect a viral infection.
  562.  
  563.               -   Develop a plan to deal with viruses *before* there is
  564.                   a problem.
  565.  
  566.                   --  Decrease the risks of an initial infection, from
  567.                       internal and external sources.
  568.                   --  Put mechanisms in place to detect viral
  569.                       infections quickly.
  570.                   --  Develop procedures to contain an infection once
  571.                       one is detected.
  572.                   --  Know how to recover from a viral infection.
  573.  
  574.               -   Test the plan periodically, as you would test a fire
  575.                   evacuation plan.
  576.  
  577.                   --  But *do not* use a real virus to test the plan!
  578.  
  579.  
  580.  
  581.  
  582.  
  583.  
  584.  
  585.  
  586.  
  587.  
  588.  
  589.  
  590.  
  591.           Executive Summary                                          4
  592.  
  593.  
  594.  
  595.  
  596.  
  597.  
  598.  
  599.  
  600.  
  601.           2.0  COPING WITH COMPUTER VIRUSES: A GUIDE FOR TECHNICAL
  602.           MANAGEMENT
  603.  
  604.  
  605.  
  606.           Once an organization makes a commitment to deal with the
  607.           problems of computer viruses, there are specific areas which
  608.           should receive attention.  The purpose of this section is to
  609.           acquaint technical management with the problems and to
  610.           indicate the actions that can be taken to limit the risks
  611.           posed by viruses.
  612.  
  613.  
  614.  
  615.           2.1  HOW VIRUSES INFECT COMPUTING SYSTEMS
  616.  
  617.  
  618.           There are many ways in which a system can become infected
  619.           with a virus.  Any time a program is run which can alter one
  620.           or more other programs, there is the possibility of viral
  621.           infection.  Any time a user executes a program which is
  622.           written by anyone else, compiled by a compiler, or linked
  623.           with run time libraries, all the resources to which that
  624.           program has access are in the hands of every person who
  625.           contributed to that program, that compiler, or those
  626.           libraries.
  627.  
  628.           The initial introduction of an infected program can occur
  629.           through a large variety of channels, including:
  630.  
  631.           o   Software introduced into or used on the system by an
  632.               outsider who had access to the system,
  633.  
  634.           o   Software used at home by an employee whose home computer
  635.               system is, unknown to the employee, itself infected,
  636.  
  637.           o   Software purchased from a commercial software company
  638.               whose production facilities are infected,
  639.  
  640.           o   Software that turns out to be infected that has been
  641.               down-loaded from public bulletin boards for business
  642.               use, or by employees,
  643.  
  644.           o   Software intentionally infected by a malicious or
  645.               disgruntled employee,
  646.  
  647.           o   *Any* other time that a piece of software (including
  648.               programs, operating systems, and so on) is created
  649.               within the organization, or brought in from *any*
  650.               outside source.
  651.  
  652.           See the appendix for an example of sources and locations of
  653.           possible infection for one operating system.
  654.  
  655.  
  656.           Coping with Computer Viruses: A Guide for Technical
  657.           Management                                                 5
  658.  
  659.  
  660.  
  661.  
  662.  
  663.  
  664.  
  665.  
  666.  
  667.           2.2  HOW VIRUSES DIFFER FROM OTHER SECURITY THREATS
  668.  
  669.  
  670.  
  671.           There are many kinds of threats to security.  Threats
  672.           traceable to dial-in systems are greatly reduced with the
  673.           use of call-back systems.  Simple threats created by
  674.           disgruntled employees can often be traced to the person
  675.           responsible.  One important thing that makes the virus
  676.           different from all the rest is its untraceability.  Except
  677.           in rare cases, the only way a virus' author becomes known is
  678.           if the author admits to ownership.  As a result, an author
  679.           can create a virus with reasonable certainty that he will
  680.           not be discovered.  This allows great latitude in the design
  681.           of the destructive portion of the virus.
  682.  
  683.           The only perfect ways to protect against viral infection are
  684.           isolation and reduced functionality.  A computer system
  685.           cannot be infected if it runs only one fixed program, and
  686.           cannot have new programs either loaded or created on it.
  687.           But this is clearly not very useful in many circumstances.
  688.           So there is almost always some exposure.  As with other
  689.           security concerns, it is a matter of weighing benefits,
  690.           practicality, and potential risks, and then taking
  691.           cost-effective action to help control those risks.
  692.  
  693.           Viruses exhibit elements of many other security threats.
  694.           (See the Glossary for a summary of some of these threats.)
  695.           There are important differences, though.  Dr. Fred Cohen,
  696.           who has done much of the original research on computer
  697.           viruses, defines a virus as:
  698.  
  699.               a program that can "infect" other programs by modifying
  700.               them to include a possibly evolved copy of itself.  (See
  701.               reference (1).)
  702.  
  703.           But a virus is more than the part that replicates itself.
  704.           There is usually also a potentially damaging portion.  This
  705.           portion could be a "time bomb" (on November 11th, display a
  706.           political message), a "logic bomb" (when it sees a certain
  707.           write to disk, it also corrupts the file structure), or
  708.           anything else the virus author can design.  The variety of
  709.           possible effects is part of the reason why the notion of a
  710.           virus is so confusing to many people.  The term "virus" is
  711.           sometimes misused to refer to anything undesirable that can
  712.           happen to a computer.  This is incorrect.  The thing that
  713.           makes viruses and related threats different from other
  714.           problems is that they spread.
  715.  
  716.  
  717.  
  718.  
  719.  
  720.  
  721.  
  722.           Coping with Computer Viruses: A Guide for Technical
  723.           Management                                                 6
  724.  
  725.  
  726.  
  727.  
  728.  
  729.  
  730.  
  731.  
  732.  
  733.           2.3  GENERAL SECURITY POLICIES
  734.  
  735.  
  736.  
  737.           2.3.1  User Education
  738.  
  739.  
  740.           Good security policies depend on the knowledge and
  741.           cooperation of the users.  This is just as true of security
  742.           against viruses as it is of policies about password
  743.           management.  Users should be aware of the dangers that
  744.           exist, should know what to do if they suspect they have
  745.           found a security problem.  In particular, they should know
  746.           whom to call if they have questions or suspicions, and
  747.           should know what to do, and what not to do, to minimize
  748.           security risks.  Users should be encouraged to feel that
  749.           security measures are things that they want to do for their
  750.           own benefit, rather than things that are required for no
  751.           rational reason.
  752.  
  753.           A strategy to detect and contain viruses is described below.
  754.           An important part of that strategy is for users to know whom
  755.           to call if they see a system problem that may be the result
  756.           of a virus.  Someone should always be available to work with
  757.           the user in determining if a problem exists, and to report
  758.           the problem to a central source of information if it is
  759.           serious.  This central source must have the ability to
  760.           inform the necessary people of the problem quickly and
  761.           reliably, and to set in motion the process of containing and
  762.           solving the problem.  More detailed suggestions for this
  763.           mechanism will be given below, but each stage depends on
  764.           education.  It is important to educate the end users, the
  765.           first-level support people, and management involved at all
  766.           levels, since they must take the necessary actions quickly
  767.           when a viral infection is detected.
  768.  
  769.  
  770.  
  771.           2.3.2  Backups
  772.  
  773.  
  774.           Even without the threat of viruses, good backups are an
  775.           important part of system management.  When a program or a
  776.           data file is lost, a good set of backups can save many days
  777.           or months of work.  The potential harm caused by computer
  778.           viruses only increases the need for backups.
  779.  
  780.           Although they are necessary for recovery, backups can also
  781.           present a place for a virus to hide.  When a virus attack
  782.           has been stopped, and the virus removed from all software on
  783.           the system, the obvious way to recover altered or lost files
  784.           is by restoring them from backups.  Great care must be taken
  785.           not to reintroduce the virus into the system in the process!
  786.  
  787.  
  788.           Coping with Computer Viruses: A Guide for Technical
  789.           Management                                                 7
  790.  
  791.  
  792.  
  793.  
  794.  
  795.  
  796.  
  797.  
  798.  
  799.           All backups should be inspected to ensure that the virus is
  800.           not present in any file on any backup.  Until a backup has
  801.           been certified "clean," it should not be used, unless
  802.           certain files on it are not recoverable through other means.
  803.           Even in this case, it is necessary to be very careful to
  804.           restore only objects which the virus did not infect or
  805.           otherwise change.  The behavior of the virus should be well
  806.           understood before any restoration from backup is attempted.
  807.  
  808.  
  809.  
  810.           2.4  DECREASING THE RISK OF VIRAL INFECTION
  811.  
  812.  
  813.           Viruses can spread from one user to another on a single
  814.           system, and from one system to another.  A virus can enter a
  815.           company either by being written within the company, or by
  816.           being brought in from the outside.  Although a virus cannot
  817.           be written accidentally, a virus may be brought in from the
  818.           outside either intentionally or unintentionally.  Viruses
  819.           can enter a company because a program is brought in from
  820.           outside which is infected, even though the person who brings
  821.           it in does not know it.
  822.  
  823.           Because sharing of programs between people is so
  824.           commonplace, it is difficult to prevent an initial infection
  825.           from "outside." An employee may take a program home to use
  826.           it for business purposes on his or her home computer, where
  827.           it becomes infected.  When the program is returned to the
  828.           workplace, the infection can spread to the workplace.
  829.           Similarly, an outside person can bring a set of programs
  830.           into a company in order to perform work desired by the
  831.           company.  If these programs are infected, and they are
  832.           executed on the company's systems, these systems may also
  833.           become infected.
  834.  
  835.           There are two major ways to prevent infection in the first
  836.           place, and to limit the spread of an existing infection:
  837.           isolating systems, and limiting their function.
  838.  
  839.  
  840.  
  841.           2.4.1  Isolated Systems
  842.  
  843.  
  844.           Since viruses spread to new users and systems only when
  845.           information is shared or communicated, you can prevent
  846.           viruses from spreading by isolating users and systems.
  847.           Systems that are connected to other systems by a network can
  848.           spread a virus across that network.  Isolating systems from
  849.           the network will prevent their being infected by that
  850.           network.  If a company maintains connections with other
  851.           companies (or universities, or other institutions) by a
  852.  
  853.  
  854.           Coping with Computer Viruses: A Guide for Technical
  855.           Management                                                 8
  856.  
  857.  
  858.  
  859.  
  860.  
  861.  
  862.  
  863.  
  864.  
  865.           network, a virus may be able to enter the company through
  866.           that network.  By isolating the company from such external
  867.           networks, it cannot be infected by these networks.
  868.  
  869.           This is a reasonable policy to follow when possible,
  870.           especially for those systems which contain especially
  871.           sensitive programs and data.  It is impractical in many
  872.           cases, though.  Networks are valuable components of a
  873.           computing system.  The easy sharing of programs and data
  874.           that they make possible can add substantially to the
  875.           productivity of a company.  You should be aware, however,
  876.           that this sharing also increases the risk of viral infection
  877.           to these systems.  This is especially true if the network
  878.           security measures have not been designed with viruses and
  879.           related threats in mind.
  880.  
  881.           Your organization may wish to limit the kinds of access to
  882.           systems afforded to those outside the organization.  In many
  883.           cases, users of external systems may be less motivated to be
  884.           benevolent to your systems than internal users are.  This
  885.           may make it worthwhile to limit the ability of external
  886.           users to transmit executable files, or have full interactive
  887.           access, to internal systems.
  888.  
  889.           Similarly, movement of programs between personal computers
  890.           on floppy disks can result in one system infecting another.
  891.           If an employee's home computer is infected, for instance,
  892.           bringing a program (or even a bootable disk) from home to
  893.           work could result in the work computer becoming infected.
  894.           You may want to have a policy that employees should not
  895.           bring programs or bootable disks between work and home.  Or,
  896.           you may want to have a policy that employees should use
  897.           virus-detection tools on their home computers as well as
  898.           their work computers.
  899.  
  900.  
  901.  
  902.  
  903.           2.4.2  Limited-Function Systems
  904.  
  905.  
  906.           Since viruses must be able to infect other executable
  907.           objects in order to spread, you can help prevent viruses
  908.           from spreading by eliminating this ability from a computing
  909.           system.  This can be done in some circumstances by
  910.           restricting the ability to add or change programs on a
  911.           system.
  912.  
  913.           If general-purpose programming must be done on a system, as
  914.           is the case with development systems, it is not possible to
  915.           prevent users from creating or adding new programs.  On
  916.           these systems, it is not possible to prevent the
  917.           introduction of viruses under every possible condition.
  918.  
  919.  
  920.           Coping with Computer Viruses: A Guide for Technical
  921.           Management                                                 9
  922.  
  923.  
  924.  
  925.  
  926.  
  927.  
  928.  
  929.  
  930.  
  931.           Many companies have computing systems, including
  932.           workstations and personal computers, that are not used for
  933.           general-purpose programming.  A bank, for instance, may use
  934.           personal computers as teller stations, to handle a fixed set
  935.           of teller transactions.  Since the tellers need not program
  936.           these systems, it may be possible to strictly limit the
  937.           introduction of new programs and thus greatly limit the
  938.           introduction of viruses onto them.
  939.  
  940.           This is a prudent policy.  Whenever practical, limit the
  941.           ability of users to add or change programs on the systems
  942.           they use.  This ability should be restricted to authorized
  943.           personnel, and these personnel should use every means
  944.           available to them to check any new programs for viruses
  945.           before they are installed in the limited-function systems.
  946.           As long as no new programs are introduced, no new viruses
  947.           can be introduced onto these systems.
  948.  
  949.           Remember, though, that the trend in personal workstations
  950.           has been toward the empowerment of the individual user,
  951.           including giving the user the ability to create programs to
  952.           suit his or her own needs.  Thus, it may not be practical
  953.           and competitive in the long run to impose restrictions on
  954.           many systems.  The risk of viral infection must be weighed
  955.           against the benefits of providing power and flexibility to
  956.           the individual user.
  957.  
  958.  
  959.  
  960.  
  961.           2.4.3  Policies for Software Repositories
  962.  
  963.  
  964.  
  965.           Software repositories are places in which programs reside
  966.           which may be used by a number of people.  These may be disks
  967.           on a mainframe, which can be accessed from a number of
  968.           different users' accounts.  They may also be disks on a
  969.           local area network file server, from which many users get
  970.           common programs.
  971.  
  972.           These repositories can pose more of a risk in the spread of
  973.           viruses than most "private" program storage locations.  If a
  974.           commonly-accessed program becomes infected, such as a text
  975.           editor used by an entire department, the entire department
  976.           can become infected very quickly.  So, extra care is
  977.           required to prevent infection of repositories.
  978.  
  979.           A policy can be put into place that requires each program
  980.           added to a repository to be checked thoroughly for possible
  981.           infection.  It is helpful, for instance, to use tools to
  982.           ensure that it is not infected with any of the already-known
  983.           viruses.
  984.  
  985.  
  986.           Coping with Computer Viruses: A Guide for Technical
  987.           Management                                                10
  988.  
  989.  
  990.  
  991.  
  992.  
  993.  
  994.  
  995.  
  996.  
  997.           In cases in which users who access the repository deal with
  998.           especially sensitive programs and data, it may be prudent to
  999.           enforce even more stringent policies.  Programs to be added
  1000.           may be tested first on isolated systems, to see if they show
  1001.           any signs of infecting other programs.  Or, a repository
  1002.           team may inspect the source code of the program for viral
  1003.           code.  If no viral code is found, the repository team can
  1004.           compile the program on an isolated system that has been
  1005.           certified to be free of viruses.  In such a case, the only
  1006.           object code allowed on the repository would come directly
  1007.           from the team's compilation on its isolated system.
  1008.  
  1009.           Repositories can also be helpful in detecting and
  1010.           controlling viruses.  Consider the situation in which most
  1011.           users run a significant amount of the software that they
  1012.           execute from a central server to which they do not have
  1013.           write access, rather than from individual writeable disks.
  1014.           Since the users do not regularly update this software,
  1015.           viruses will not be able to spread as quickly between these
  1016.           users.  If a program on a central repository becomes
  1017.           infected, it may be comparatively simple to replace it with
  1018.           an uninfected version (or remove it entirely).  It may be
  1019.           more difficult to screen all programs on hundreds of
  1020.           individual systems.  It may also be easier to audit the
  1021.           usage of, and updates to, a single software repository, as
  1022.           opposed to a large number of individual systems.
  1023.  
  1024.           There are a variety of other areas in many organizations
  1025.           which could spread viruses rapidly, and hence which should
  1026.           be carefully controlled.  Internal software distribution
  1027.           centers, for instance, could spread a virus widely if they
  1028.           were infected.  Similarly, a software lending library, if
  1029.           infected, may transmit a virus to many other users before it
  1030.           is detected.  Walk-in demo rooms and educational centers are
  1031.           also potential problems.  In general, any place from which
  1032.           software is widely distributed, and which has uncontrolled
  1033.           software importation, needs special attention.
  1034.  
  1035.  
  1036.  
  1037.  
  1038.           2.4.4  Policies for Production Systems
  1039.  
  1040.  
  1041.           Production systems are those systems which are used to
  1042.           prepare internally-developed programs for distribution
  1043.           either within a company, or for sale to external customers.
  1044.           If these systems were infected with a virus, the virus could
  1045.           spread to programs used widely within the company, or to
  1046.           programs used by the company's customers.  In the former
  1047.           case, this could spread the virus widely throughout the
  1048.           company.  In the latter case, it could damage the reputation
  1049.           of the company with its customers.  There has been
  1050.  
  1051.  
  1052.           Coping with Computer Viruses: A Guide for Technical
  1053.           Management                                                11
  1054.  
  1055.  
  1056.  
  1057.  
  1058.  
  1059.  
  1060.  
  1061.  
  1062.  
  1063.           documented cases of companies accidentally shipping
  1064.           virus-infected program products to customers.
  1065.  
  1066.           Since the infection of production systems could have serious
  1067.           consequences, you should be especially careful about
  1068.           protecting them.  The key to this is the institution of
  1069.           stringent change control policies on production systems.
  1070.  
  1071.           They should be strongly isolated from non-production
  1072.           systems, so that only known, authorized files can be put
  1073.           onto the system.  Each file should be checked for infection,
  1074.           to whatever extent possible.  Installing object code on
  1075.           these systems should be avoided whenever possible.  Rather,
  1076.           source code should be installed, and compiled locally with a
  1077.           trusted compiler.  Where the impact of a viral infection
  1078.           would be particularly large, it may be important to inspect
  1079.           the source code before it is compiled, to avoid the
  1080.           introduction of a virus through the source code.  If object
  1081.           code must be installed, its origin should be verified
  1082.           beforehand.  For instance, object code for a personal
  1083.           computer could be installed only from an original,
  1084.           write-protected distribution disk, which has been found to
  1085.           be free of viruses.
  1086.  
  1087.           In addition, virus-checking programs (see below) should be
  1088.           run frequently on production systems.  On a multitasking
  1089.           system, it may be possible to run a virus detector
  1090.           continuously in the background.  Further, a policy can be
  1091.           instituted which ensures that a virus detector will be
  1092.           executed at least once between the time that new files are
  1093.           installed on the system, and the time that any files are
  1094.           exported from the system.
  1095.  
  1096.  
  1097.  
  1098.           2.5  DETECTING VIRAL INFECTIONS
  1099.  
  1100.  
  1101.           With the possible exception of isolation, all of the methods
  1102.           outlined above for preventing viral infections are only
  1103.           somewhat reliable.  Viruses can still reach some systems
  1104.           despite the implementation of preventative measures.
  1105.           Indeed, no perfect defense exists that still allows
  1106.           programming, and sharing of executable information.  There
  1107.           is no "one time fix," as there is for many other computer
  1108.           security problems.  This is a hole that cannot be plugged
  1109.           completely.  Defenses will have to be improved with time to
  1110.           deal with new classes of viruses.  Because of this, virus
  1111.           *detection* is an important component of system security.
  1112.  
  1113.           The two most important resources available for the detection
  1114.           of viruses are watchful users and watchful programs.  The
  1115.           best approaches to virus detection include both.  The users
  1116.  
  1117.  
  1118.           Coping with Computer Viruses: A Guide for Technical
  1119.           Management                                                12
  1120.  
  1121.  
  1122.  
  1123.  
  1124.  
  1125.  
  1126.  
  1127.  
  1128.  
  1129.           should be aware of the possibility of viruses, just as they
  1130.           are aware of the need for backups, and to know what kinds of
  1131.           things to watch for.  System programs and utilities should
  1132.           be available to help the users, and the computer center
  1133.           staff, to take advantage of this awareness.
  1134.  
  1135.  
  1136.  
  1137.           2.5.1  Watching for Unexpected Things Happening
  1138.  
  1139.  
  1140.           If users are aware of the kinds of visible things that are
  1141.           known to happen in systems that are virus-infected, these
  1142.           users can serve as an important line of defense.  Users
  1143.           should know that odd behavior in a computer system may be a
  1144.           symptom of penetration by a virus, and they should know to
  1145.           whom such odd behavior should be reported.
  1146.  
  1147.           On the other hand, it is a fact that odd behavior is usually
  1148.           *not* caused by viral penetration.  Software bugs, user
  1149.           errors, and hardware failures are much more common.  It is
  1150.           important to avoid unfounded rumors of viral infections, as
  1151.           dealing with such "false alarms" can be costly.  An actual
  1152.           infection, however, may require rapid action.  So the group
  1153.           to which users report oddities must have the skill to
  1154.           determine which reports are almost certainly due to one of
  1155.           these more common causes, and which merit closer
  1156.           investigation for possible viral infection.  One obvious
  1157.           choice for such a group is within the computing center or
  1158.           "help desk," since the computing center staff probably
  1159.           already has a good idea of what sorts of oddities are
  1160.           "business as usual."
  1161.  
  1162.  
  1163.  
  1164.           2.5.2  Some Symptoms of Known Viruses
  1165.  
  1166.  
  1167.  
  1168.  
  1169.           2.5.2.1  Workstation Viruses
  1170.  
  1171.  
  1172.           This section lists specific oddities that are known to occur
  1173.           in workstations infected with particular viruses that have
  1174.           already occurred.  Some of the things in these examples only
  1175.           occur once the virus is in place, and is triggered to
  1176.           perform its particular function.  Others occur while the
  1177.           virus is still spreading.  Some things users should know to
  1178.           watch for include:
  1179.  
  1180.           o   Unexpected changes in the time stamps or length of
  1181.               files, particularly executable files,
  1182.  
  1183.  
  1184.           Coping with Computer Viruses: A Guide for Technical
  1185.           Management                                                13
  1186.  
  1187.  
  1188.  
  1189.  
  1190.  
  1191.  
  1192.  
  1193.  
  1194.  
  1195.           o   Programs taking longer to start, or running more slowly
  1196.               than usual,
  1197.           o   Programs attempting to write to write-protected media
  1198.               for no apparent reason,
  1199.           o   Unexplained decreases in the amount of available
  1200.               workstation memory, or increases in areas marked as
  1201.               "bad" on magnetic media,
  1202.           o   Executable files unexpectedly vanishing,
  1203.           o   Workstations unexpectedly "rebooting" when certain
  1204.               previously-correct programs are run, or a relatively
  1205.               constant amount of time after being turned on,
  1206.           o   Unusual things appearing on displays, including
  1207.               "scrolling" of odd parts of the screen, or the
  1208.               unexpected appearance of "bouncing balls" or odd
  1209.               messages,
  1210.           o   Unexpected changes to volume labels on disks and other
  1211.               media,
  1212.           o   An unusual load on local networks or other communication
  1213.               links, especially when multiple copies of the same data
  1214.               are being sent at once.
  1215.  
  1216.           It is important to remember, though, that future viruses may
  1217.           do none of these things.  Users should be alert to oddities
  1218.           in general and should have a place to report them, as
  1219.           recommended above.
  1220.  
  1221.  
  1222.  
  1223.  
  1224.           2.5.2.2  Mainframe Viruses
  1225.  
  1226.  
  1227.  
  1228.           Viruses in multi-user computer systems share some of the
  1229.           typical behaviors of viruses in single-user workstations.
  1230.           In particular, lengths or time stamps of executable files
  1231.           may change, programs may load or execute more slowly,
  1232.           unusual errors (especially relating to disk-writes) may
  1233.           occur, files may vanish or proliferate, and odd things may
  1234.           appear on displays.  If the virus is attempting to spread
  1235.           between users, users may also notice "outgoing mail" that
  1236.           they did not intend to send, "links" to other user's
  1237.           information that they did not intentionally establish, and
  1238.           similar phenomena.
  1239.  
  1240.           Generally, the same comments apply in this environment as in
  1241.           the single-user workstation environment.  Future viruses may
  1242.           do none of these things, and users should be sensitive to
  1243.           suspicious oddities in general, and have a place to which to
  1244.           report them.
  1245.  
  1246.  
  1247.  
  1248.  
  1249.  
  1250.           Coping with Computer Viruses: A Guide for Technical
  1251.           Management                                                14
  1252.  
  1253.  
  1254.  
  1255.  
  1256.  
  1257.  
  1258.  
  1259.  
  1260.  
  1261.           2.5.3  Watching for Changes to Executable Objects
  1262.  
  1263.  
  1264.  
  1265.           Users are not the only line of defense in the detection of
  1266.           viruses.  It is comparatively simple to create programs that
  1267.           will detect the presence and the spread of the simpler
  1268.           classes of viruses.  Such programs can go a long way in
  1269.           "raising the bar" against computer viruses.
  1270.  
  1271.           One effective approach to detecting simple viruses involves
  1272.           notifying the user of changes to the contents of executable
  1273.           objects (program files, "boot records" on magnetic media,
  1274.           and so forth).  Users can be provided with a program to be
  1275.           run once a day which will examine the executable objects to
  1276.           be checked, and compare their characteristics with those
  1277.           found the last time the program was run.  (This could be run
  1278.           at the same time as the backup program, for instance.)  The
  1279.           user can then be presented with a list of objects that have
  1280.           changed.  If things have changed that should not have, the
  1281.           user can contact the appropriate people to investigate.  If
  1282.           certain objects that should seldom or never change (such as
  1283.           the operating system files themselves) are different, the
  1284.           user can be specially warned, and urged to contact the
  1285.           appropriate people.
  1286.  
  1287.           Often, a central system programming group has control over a
  1288.           large multi-user computing system.  That group can execute
  1289.           this sort of program periodically, to check for changes to
  1290.           common operating system utilities, and to the operating
  1291.           system itself.  Because viruses can often spread to
  1292.           privileged users, they are quite capable of infecting even
  1293.           those parts of the system that require the highest authority
  1294.           to access.
  1295.  
  1296.           The frequency with which virus detectors should be used
  1297.           depends upon the rate at which executables are transmitted,
  1298.           and the value of the information assets on the systems.
  1299.           Workstations that are not connected to networks can exchange
  1300.           information via floppy disks.  The known computer viruses
  1301.           that propagate by way of floppy disks do so relatively
  1302.           slowly.  It may take days, or weeks, or even months for such
  1303.           a virus to propagate across a large organization.  In this
  1304.           case, running virus detectors once a day, or once a week,
  1305.           may be sufficient.  For systems connected to networks,
  1306.           especially large-scale networks, the situation is much
  1307.           different.  Experience has shown network viruses to be
  1308.           capable of spreading very rapidly across the network.  In
  1309.           some cases, replicating programs have spread across
  1310.           nationwide networks in a matter of hours or days.  In these
  1311.           cases, it may be important to run virus detectors hourly or
  1312.           daily.
  1313.  
  1314.  
  1315.  
  1316.           Coping with Computer Viruses: A Guide for Technical
  1317.           Management                                                15
  1318.  
  1319.  
  1320.  
  1321.  
  1322.  
  1323.  
  1324.  
  1325.  
  1326.  
  1327.           Below is an outline of one possible implementation of a
  1328.           virus detecting program.  It is for illustration only; many
  1329.           different structures would do the job as well or better.
  1330.  
  1331.           1.  The program obtains a list of files to be checked.  For
  1332.               PC-DOS, for instance, this should include .COM and .EXE
  1333.               files, any files that are listed as device drivers in
  1334.               the CONFIG.SYS file, the CONFIG.SYS file itself, and any
  1335.               other executables such as batch files or BASIC programs.
  1336.           2.  For each of these files, the program
  1337.               o   Determines the time/date and length of the file from
  1338.                   the operating system.
  1339.               o   If desired, actually reads the data in the file, and
  1340.                   performs a calculation such as a CRC (cyclic
  1341.                   redundancy check) on the data.  (The number of files
  1342.                   checked in such detail depends on the importance of
  1343.                   the file, the speed of the program, and the amount
  1344.                   of time the user is willing to spend.)
  1345.               o   Compares this file information (time/date, length,
  1346.                   and perhaps CRC or other code) with the database
  1347.                   generated last time the program was run.
  1348.               o   If the file was not present the last time the
  1349.                   program was run, or if the information in the
  1350.                   previous database was different from the information
  1351.                   just obtained, the program records that the file is
  1352.                   new or changed.
  1353.           3.  After checking all relevant files, the program reads all
  1354.               other known executable objects in the system(1), and
  1355.               compares their CRC or other codes with the values in the
  1356.               database, and records any changes.
  1357.           4.  When all the existing objects have been checked in this
  1358.               way, the program updates the database for next time and
  1359.               presents all its findings to the user.
  1360.           5.  On the basis of this information, the user can decide
  1361.               whether any of the reported changes are suspicious, and
  1362.               worth reporting.
  1363.  
  1364.           This method is by no means foolproof.  A sophisticated virus
  1365.           could do a variety of things.  It could change an executable
  1366.           object without altering the time, date, length, or CRC code.
  1367.           It could only alter objects that had been legitimately
  1368.           changed recently.  It could act directly on the database
  1369.           itself and thus escape detection.  More sophisticated
  1370.           versions of the program outlined here can provide
  1371.           significantly more foolproof detection.  It is advantageous
  1372.           to have many different virus detectors in place at the same
  1373.  
  1374.           ----------------
  1375.           (1) For PC-DOS, this would typically include the boot record
  1376.               on a floppy diskette, and the master and partition boot
  1377.               records on hard disks.  For multi-user operating
  1378.               systems, this might include "shared system images," or
  1379.               "IPL datasets" or equivalent objects.
  1380.  
  1381.  
  1382.           Coping with Computer Viruses: A Guide for Technical
  1383.           Management                                                16
  1384.  
  1385.  
  1386.  
  1387.  
  1388.  
  1389.  
  1390.  
  1391.  
  1392.  
  1393.           time.  That way, a virus that can evade one detector may be
  1394.           caught by another.  Nevertheless, user awareness, and
  1395.           procedures for recovery in the event of an infection that is
  1396.           not detected until too late, are both still vital.
  1397.  
  1398.  
  1399.  
  1400.           2.5.4  Using External Information Sources
  1401.  
  1402.  
  1403.           Software viruses are able to spread because information
  1404.           flows so quickly in the modern world.  That same information
  1405.           flow can help in the detection of viruses.  Newspapers,
  1406.           magazines, journals, and network discussion groups have
  1407.           carried significant amounts of material dealing with
  1408.           computer viruses and other forms of malicious software.
  1409.           These sources of information can be valuable in maintaining
  1410.           awareness of what hazards exist, and what measures are
  1411.           available to detect or prevent specific viruses.  This kind
  1412.           of information can be invaluable to the people in your
  1413.           organization charged with investigating suspicious events
  1414.           reported by users, and deciding which ones to follow up on.
  1415.           On the other hand, these channels also carry a certain
  1416.           amount of inevitable misinformation, and care should be
  1417.           taken not to react to, or spread, rumors that seem to have
  1418.           no likely basis in fact.
  1419.  
  1420.  
  1421.  
  1422.           2.6  CONTAINING VIRAL INFECTIONS
  1423.  
  1424.  
  1425.           Having procedures in place to detect viral infection is very
  1426.           important.  By itself, however, it is of little use.  The
  1427.           individual who makes the first detection must have a
  1428.           procedure to follow to verify the problem and to make sure
  1429.           that appropriate action occurs.  If the information supplied
  1430.           in the detection phase is allowed to "fall between the
  1431.           cracks," even for a relatively short time, the benefit of
  1432.           detection can easily be lost.
  1433.  
  1434.  
  1435.  
  1436.  
  1437.           2.6.1  The Importance of Early Detection
  1438.  
  1439.  
  1440.           Computer viruses generally spread exponentially.  If a virus
  1441.           has infected only one system in a network on Monday, and
  1442.           spread to four by Tuesday, sixteen systems could easily be
  1443.           infected by Wednesday, and over five hundred by Friday.
  1444.           (These numbers are just samples, of course, but they give an
  1445.           idea of the potential speed of spread.  See reference (1)
  1446.  
  1447.  
  1448.           Coping with Computer Viruses: A Guide for Technical
  1449.           Management                                                17
  1450.  
  1451.  
  1452.  
  1453.  
  1454.  
  1455.  
  1456.  
  1457.  
  1458.  
  1459.           for some experiments in which much faster spread was
  1460.           observed.)
  1461.  
  1462.           Because viruses can spread so fast, it is very important to
  1463.           detect them as early as possible after the first infection.
  1464.           The surest way of doing this is to have every vulnerable
  1465.           user run the best available virus-detection software as
  1466.           often as feasible.  This solution may be too expensive and
  1467.           time-consuming for most environments.
  1468.  
  1469.           In most groups of users, it is possible to identify a number
  1470.           of "star" users who do a disproportionately large amount of
  1471.           information-exchange, who generally run new software before
  1472.           most people do, and who are the first to try out new things
  1473.           in general.  In multi-user systems, some of these people
  1474.           often have special authorities and privileges.  When a virus
  1475.           reaches one of these people, it can spread very rapidly to
  1476.           the rest of the community.  In making cost/benefit decisions
  1477.           about which users should spend the most time or effort on
  1478.           virus-detection, these are the people to concentrate on.
  1479.  
  1480.  
  1481.  
  1482.  
  1483.           2.6.2  The Importance of Rapid Action
  1484.  
  1485.  
  1486.           When a virus is detected, every moment spent deciding what
  1487.           to do next may give the virus another chance to spread.  It
  1488.           is vital, therefore, to have action plans in place *before* an
  1489.           infection occurs.  Such plans should include, for instance:
  1490.  
  1491.           o   Designation of one particular group (whether formal or
  1492.               informal) as the "crisis team,"
  1493.           o   Procedures for identifying infected systems, by
  1494.               determining how and from where the infection reached
  1495.               each system known to be infected,
  1496.           o   Procedures for isolating those systems until they can be
  1497.               rendered free of the virus,
  1498.           o   Procedures for informing vulnerable users about the
  1499.               virus, and about how to avoid spreading it themselves,
  1500.           o   Procedures for removing the virus from infected systems,
  1501.           o   Procedures for identifying the virus involved, and for
  1502.               developing or obtaining specific software or procedures
  1503.               to combat the virus.  These may remove the virus from
  1504.               infected systems and files, determine whether or not
  1505.               backups are infected, and so on.
  1506.           o   Procedures for recording the characteristics of the
  1507.               virus and the effectiveness of the steps taken against
  1508.               it, in case of later re-infection with the same or a
  1509.               similar virus.
  1510.  
  1511.           Some suggestions for recovery are given in the next section.
  1512.  
  1513.  
  1514.           Coping with Computer Viruses: A Guide for Technical
  1515.           Management                                                18
  1516.  
  1517.  
  1518.  
  1519.  
  1520.  
  1521.  
  1522.  
  1523.  
  1524.  
  1525.           2.7  RECOVERING FROM VIRAL INFECTIONS
  1526.  
  1527.  
  1528.           Once a virus has been detected and identified, and measures
  1529.           have been taken to stop it from spreading further, it is
  1530.           necessary to recover from the infection, and get back to
  1531.           business as usual.  The main objective of this activity is
  1532.           to provide each affected user with a normal, uninfected
  1533.           computing environment.  For individual workstations, this
  1534.           means ensuring that no infected objects remain on the
  1535.           workstation.  For more complex environments, it means
  1536.           ensuring that no infected objects remain anywhere on the
  1537.           system where they might inadvertently be executed.
  1538.  
  1539.           The basic recovery activities are:
  1540.  
  1541.           o   Replacing every infected object in the system with an
  1542.               uninfected version, and
  1543.           o   Restoring any other objects that the virus' actions may
  1544.               have damaged.
  1545.  
  1546.           It is of critical importance during these activities to
  1547.           avoid re-introducing the virus into the system.  This could
  1548.           be done, for instance, by restoring an infected executable
  1549.           file from a backup tape.
  1550.  
  1551.  
  1552.  
  1553.  
  1554.           2.7.1  Restoration and Backups
  1555.  
  1556.  
  1557.  
  1558.           An obvious but incorrect approach to removing the infection
  1559.           from a system is simply to restore the infected objects from
  1560.           backups.  This is *not* a wise thing to do, however, since
  1561.           the backups themselves may be infected.  If the virus first
  1562.           entered the system sufficiently long ago, infected objects
  1563.           may well have been backed up in infected form.
  1564.  
  1565.           Once the virus has been well understood, in terms of what
  1566.           types of objects it spreads itself to, three different
  1567.           categories of objects may be considered for restoration:
  1568.  
  1569.           o   Objects of the type that the virus infects.  These
  1570.               should only be restored from backups if the backed-up
  1571.               versions are thoroughly and individually checked for
  1572.               infection by the virus.  If it is possible, it is
  1573.               preferable to restore the objects from more "trusted"
  1574.               sources, such as original, unwriteable, copies supplied
  1575.               by the manufacturer, or by recompiling source code.
  1576.               Even in these cases, it is worthwhile to check once
  1577.               again for infection after restoration has been done.
  1578.  
  1579.  
  1580.           Coping with Computer Viruses: A Guide for Technical
  1581.           Management                                                19
  1582.  
  1583.  
  1584.  
  1585.  
  1586.  
  1587.  
  1588.  
  1589.  
  1590.  
  1591.           o   Objects of types that the virus does not infect, but
  1592.               which have been destroyed or altered by the virus'
  1593.               actions.  These can generally be restored from backups
  1594.               safely, although again it is worth checking the
  1595.               integrity of the backed-up copies.  If the virus has
  1596.               been in the system long enough, it may have damaged
  1597.               objects that were later backed up.
  1598.  
  1599.           o   Objects of types that the virus neither infects, nor
  1600.               damages.  If you are very sure that the virus does not
  1601.               infect or alter certain types of files, there may be no
  1602.               need to restore those files during the recovery process.
  1603.  
  1604.  
  1605.  
  1606.           2.7.2  Virus-Removing Programs
  1607.  
  1608.  
  1609.           Once a virus has been studied, you can write or obtain
  1610.           programs to help remove that particular virus.  One type of
  1611.           these programs checks for the presence of the virus in a
  1612.           executable objects.  Another type tries to remove the
  1613.           infection by restoring the object to its previous uninfected
  1614.           form.  "Checking" programs can be extremely valuable during
  1615.           the recovery process, to ensure that files that are being
  1616.           restored after infection or damage by the virus are now
  1617.           "clean." "Removal" programs are somewhat less useful, and
  1618.           should usually only be used when there is no other practical
  1619.           way to obtain an uninfected version of the object.  Removing
  1620.           a virus from an executable object can be a complex and
  1621.           difficult process, and even a well-written program may fail
  1622.           to restore the object correctly.
  1623.  
  1624.  
  1625.  
  1626.           2.7.3  Watching for Re-Infection
  1627.  
  1628.  
  1629.           Once recovery is complete, and all known infected and
  1630.           damaged objects have been restored to uninfected and correct
  1631.           states, it is necessary to remain watchful for some time.  A
  1632.           system that has recently been infected by a certain virus
  1633.           runs an increased risk of re-infection by that same virus.
  1634.           The re-infection can occur through some obscure, infected
  1635.           object that was missed in the recovery process.  It can also
  1636.           occur from the same outside source as the original
  1637.           infection.  This is especially true if the original source
  1638.           of infection is not known.
  1639.  
  1640.           Vigilance in the use of general virus-detection programs,
  1641.           like those described above, continues to be important.  In
  1642.           addition, it will often be possible to obtain or write
  1643.           programs designed to detect the specific virus from which
  1644.  
  1645.  
  1646.           Coping with Computer Viruses: A Guide for Technical
  1647.           Management                                                20
  1648.  
  1649.  
  1650.  
  1651.  
  1652.  
  1653.  
  1654.  
  1655.  
  1656.  
  1657.           the system has just recovered.  Specific virus-detection
  1658.           programs of this kind are particularly useful at this time.
  1659.           The same users who use the general virus-detection programs,
  1660.           and any users who would be specifically vulnerable to the
  1661.           virus just recovered from, can be given such programs to
  1662.           run.  This increases the probability of detection, should an
  1663.           infection recur.  The programs might also be incorporated
  1664.           into the backup system for a time, to scan files being
  1665.           backed up for infection, and even into appropriate places in
  1666.           networks and file-sharing systems.  Because such checks will
  1667.           introduce extra overhead, there will be a trade-off between
  1668.           performance and added security in considering how long to
  1669.           leave them in place.
  1670.  
  1671.  
  1672.  
  1673.           2.8  SUMMARY AND RECOMMENDATIONS
  1674.  
  1675.  
  1676.           Computer viruses can pose a threat to the security of
  1677.           programs and data on computing systems.  We have suggested
  1678.           several means of limiting this threat.  They are summarized
  1679.           below.
  1680.  
  1681.  
  1682.           o   Viruses represent a new kind of threat to the security
  1683.               of computing systems.
  1684.  
  1685.               -   They can be spread without the intent of the people
  1686.                   who spread them.
  1687.               -   They can spread widely and quickly within an
  1688.                   organization, reaching systems and users well beyond
  1689.                   the initial infection point.
  1690.               -   They can perform virtually any action that their
  1691.                   designer intends.
  1692.  
  1693.  
  1694.           o   The risks posed by viruses can be limited by proper
  1695.               action.
  1696.  
  1697.               -   Follow good security practices in general.
  1698.  
  1699.                   --  Educate your users about security threats,
  1700.                       including computer viruses.
  1701.                   --  Make sure that good backups are kept of all
  1702.                       important data.
  1703.  
  1704.               -   Take steps to reduce the possibility of being
  1705.                   infected.
  1706.  
  1707.                   --  Where practical, isolate critical systems from
  1708.                       sources of infection, such as networks and
  1709.                       outside programs.
  1710.  
  1711.  
  1712.           Coping with Computer Viruses: A Guide for Technical
  1713.           Management                                                21
  1714.  
  1715.  
  1716.  
  1717.  
  1718.  
  1719.  
  1720.  
  1721.  
  1722.  
  1723.                   --  Where practical, limit the ability to create or
  1724.                       install new programs on those systems which do
  1725.                       not require this ability.
  1726.                   --  Ensure that adequate controls exist on software
  1727.                       repositories, production systems, and other
  1728.                       important areas of your organization.  These
  1729.                       include careful change management and the use of
  1730.                       virus detectors.
  1731.  
  1732.               -   Take steps to ensure that virus infections will be
  1733.                   detected quickly.
  1734.  
  1735.                   --  Educate your users about possible warning signs.
  1736.                   --  Use virus detectors, which will inform users of
  1737.                       the unintended modification of programs and
  1738.                       data.
  1739.                   --  Make sure your users know to whom they can
  1740.                       report a potential problem.
  1741.  
  1742.               -   Take steps to contain virus infections that are
  1743.                   detected.
  1744.  
  1745.                   --  A plan to deal with an infection should be put
  1746.                       into place *before* an infection occurs.
  1747.                   --  A "crisis team" should be put into place, which
  1748.                       can respond quickly to a potential problem.
  1749.                   --  Isolate infected systems until they can be
  1750.                       cleaned up, to avoid them infecting other
  1751.                       systems, and to avoid their becoming reinfected.
  1752.  
  1753.               -   Take steps to recover from viral infections that are
  1754.                   contained.
  1755.  
  1756.                   --  Be able to restore critical programs and data
  1757.                       from virus-free backups.
  1758.                   --  Know how to remove viruses from programs if
  1759.                       virus-free backups are unavailable.
  1760.                   --  Watch for a reinfection from that particular
  1761.                       virus.
  1762.  
  1763.  
  1764.  
  1765.  
  1766.  
  1767.  
  1768.  
  1769.  
  1770.  
  1771.  
  1772.  
  1773.  
  1774.  
  1775.  
  1776.  
  1777.  
  1778.           Coping with Computer Viruses: A Guide for Technical
  1779.           Management                                                22
  1780.  
  1781.  
  1782.  
  1783.  
  1784.  
  1785.  
  1786.  
  1787.  
  1788.  
  1789.           FOR FURTHER READING
  1790.  
  1791.  
  1792.  
  1793.           (1)  Fred Cohen, "Computer Viruses: Theory and Experiment,"
  1794.                 Computers & Security, Vol. 6 (1987), pp. 22-35
  1795.  
  1796.           (2)  Fred Cohen, "On the Implications of Computer Viruses
  1797.                 and Methods of Defense," Computers & Security, Vol. 7
  1798.                 (1988), pp. 167-184
  1799.  
  1800.           (3)  W.H. Murray, "Security Considerations for Personal
  1801.                 Computers," IBM System Journal, Vol. 23, No. 3 (1984),
  1802.                 pp. 297-304
  1803.  
  1804.           (4)  --, "Security Risk Assessment in Electronic Data
  1805.                 Processing Systems," IBM Publication Number
  1806.                 G320-9256-0 (1984)
  1807.  
  1808.           (5)  --, "Good Security Practices for Information Systems
  1809.                 Networks," IBM Publication Number G360-2715-0 (1987)
  1810.  
  1811.           (6)  --, "An Executive Guide to Data Security," IBM
  1812.                 Publication Number G320-5647-0 (1975)
  1813.  
  1814.           (7)  --, "Security, Auditability, System Control
  1815.                 Publications Bibliography," IBM Publication Number
  1816.                 G320-9279-2 (1987)
  1817.  
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.  
  1830.  
  1831.  
  1832.  
  1833.  
  1834.  
  1835.  
  1836.  
  1837.  
  1838.  
  1839.  
  1840.  
  1841.  
  1842.  
  1843.  
  1844.  
  1845.           For Further Reading                                       23
  1846.  
  1847.  
  1848.  
  1849.  
  1850.  
  1851.  
  1852.  
  1853.  
  1854.  
  1855.                 GLOSSARY
  1856.  
  1857.  
  1858.  
  1859.                 Computer viruses and the like are relatively new
  1860.                 phenomena.  The terms used to describe them do not
  1861.                 have definitions that are universally agreed upon.  In
  1862.                 this glossary, we give definitions that try to clarify
  1863.                 the differences between the various concepts.  These
  1864.                 terms may be used differently elsewhere.
  1865.  
  1866.  
  1867.  
  1868.                 Availability:  That aspect of security that deals with
  1869.                 the timely delivery of information and services to the
  1870.                 user.  An attack on availability would seek to sever
  1871.                 network connections, tie up accounts or systems, etc.
  1872.  
  1873.                 Back Door:  A feature built into a program by its
  1874.                 designer, which allows the designer special privileges
  1875.                 that are denied to the normal users of the program.  A
  1876.                 back door in a logon program, for instance, could
  1877.                 enable the designer to log on to a system, even though
  1878.                 he or she did not have an authorized account on that
  1879.                 system.
  1880.  
  1881.                 Bacterium (informal):  A program which, when executed,
  1882.                 spreads to other users and systems by sending copies
  1883.                 of itself.  (Though, since it does "infect" other
  1884.                 programs, it may be thought of as a "system virus" as
  1885.                 opposed to a "program virus.") It differs from a
  1886.                 "rabbit" (see below) in that it is not necessarily
  1887.                 designed to exhaust system resources.
  1888.  
  1889.                 Bug:  An error in the design or implementation of a
  1890.                 program that causes it to do something that neither
  1891.                 the user nor the program author had intended to be
  1892.                 done.
  1893.  
  1894.                 Confidentiality:  That aspect of security which deals
  1895.                 with the restriction of information to those who are
  1896.                 authorized to use it.  An attack on confidentiality
  1897.                 would seek to view databases, print files, discover a
  1898.                 password, etc., to which the attacker was not
  1899.                 entitled.
  1900.  
  1901.                 Integrity:  That aspect of security that deals with
  1902.                 the correctness of information or its processing.  An
  1903.                 attack on integrity would seek to erase a file that
  1904.                 should not be erased, alter an element of a database
  1905.                 improperly, corrupt the audit trail for a series of
  1906.                 events, propagate a virus, etc.
  1907.  
  1908.  
  1909.  
  1910.  
  1911.           Glossary                                                  24
  1912.  
  1913.  
  1914.  
  1915.  
  1916.  
  1917.  
  1918.  
  1919.  
  1920.  
  1921.                 Logic Bomb:  A Trojan Horse (see below), which is left
  1922.                 within a computing system with the intent of it
  1923.                 executing when some condition occurs.  The logic bomb
  1924.                 could be triggered by a change in a file (e.g. the
  1925.                 removal of the designer's userid from the list of
  1926.                 employees of the organization), by a particular input
  1927.                 sequence to the program, or at a particular time or
  1928.                 date (see "Time Bomb" below).  Logic bombs get their
  1929.                 name from malicious actions that they can take when
  1930.                 triggered.
  1931.  
  1932.                 Rabbit (informal):  A program is designed to exhaust
  1933.                 some resource of a system (CPU time, disk space, spool
  1934.                 space, etc.) by replicating itself without limit.  It
  1935.                 differs from a "bacterium" (see above) in that a
  1936.                 rabbit is specifically designed to exhaust resources.
  1937.                 It differs from a "virus" (see below) in that it is a
  1938.                 complete program in itself; it does not "infect" other
  1939.                 programs.
  1940.  
  1941.                 Rogue Program:  This term has been used in the popular
  1942.                 press to denote any program intended to damage
  1943.                 programs or data, or to breach the security of
  1944.                 systems.  As such, it encompasses malicious Trojan
  1945.                 Horses, logic bombs, viruses, and so on.
  1946.  
  1947.                 Security:  When applied to computing systems, this
  1948.                 denotes the authorized, correct, timely performance of
  1949.                 computing tasks.  It encompasses the areas of
  1950.                 confidentiality, integrity, and availability.
  1951.  
  1952.                 Time Bomb:  A "logic bomb" (see above) activated at a
  1953.                 certain time or date.
  1954.  
  1955.                 Trojan Horse:  Any program designed to do things that
  1956.                 the user of the program did not intend to do.  An
  1957.                 example of this would be a program which simulates the
  1958.                 logon sequence for a computer and, rather than logging
  1959.                 the user on, simply records the user's userid and
  1960.                 password in a file for later collection.  Rather than
  1961.                 logging the user on (which the user intended), it
  1962.                 steals the user's password so that the Trojan Horse's
  1963.                 designer can log on as the user (which the user did
  1964.                 not intend).
  1965.  
  1966.                 Virus (pl. viruses):  a program that can "infect"
  1967.                 other programs by modifying them to include a possibly
  1968.                 evolved copy of itself.  Note that a program need not
  1969.                 perform malicious actions to be a virus; it need only
  1970.                 "infect" other programs.  Many viruses that have been
  1971.                 encountered, however, do perform malicious actions.
  1972.  
  1973.                 Worm:  A program that spreads copies of itself through
  1974.                 network-attached computers.  The first use of the term
  1975.  
  1976.  
  1977.           Glossary                                                  25
  1978.  
  1979.  
  1980.  
  1981.  
  1982.  
  1983.  
  1984.  
  1985.  
  1986.  
  1987.                 described a program that copied itself benignly around
  1988.                 a network, using otherwise-unused resources on
  1989.                 networked machines to perform distributed computation.
  1990.                 Some worms are security threats, using networks to
  1991.                 spread themselves against the wishes of the system
  1992.                 owners, and disrupting networks by overloading them.
  1993.  
  1994.  
  1995.  
  1996.  
  1997.  
  1998.  
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.  
  2007.  
  2008.  
  2009.  
  2010.  
  2011.  
  2012.  
  2013.  
  2014.  
  2015.  
  2016.  
  2017.  
  2018.  
  2019.  
  2020.  
  2021.  
  2022.  
  2023.  
  2024.  
  2025.  
  2026.  
  2027.  
  2028.  
  2029.  
  2030.  
  2031.  
  2032.  
  2033.  
  2034.  
  2035.  
  2036.  
  2037.  
  2038.  
  2039.  
  2040.  
  2041.  
  2042.  
  2043.           Glossary                                                  26
  2044.  
  2045.  
  2046.  
  2047.  
  2048.  
  2049.  
  2050.  
  2051.  
  2052.  
  2053.                 APPENDIX: VIRAL INFECTIONS IN PC-DOS
  2054.  
  2055.  
  2056.  
  2057.                 This section is intended to give an example of the
  2058.                 places in a typical computer system where a virus
  2059.                 might enter.  It is intended for a reader with some
  2060.                 knowledge of the workings of PC-DOS, although it may
  2061.                 be instructive to others as well.  PC-DOS was chosen
  2062.                 for convenience; many computer systems have similar
  2063.                 vulnerabilities.
  2064.  
  2065.                 Consider the process that is required for you to run a
  2066.                 single program.  What is happening?  Which parts do
  2067.                 you not bother checking since you have seen it a
  2068.                 million times?
  2069.  
  2070.                 For example, you turn on the power switch and then ...
  2071.  
  2072.                 o   You boot off the disk.  What code ran to enable
  2073.                     you to boot off the disk?
  2074.  
  2075.                 o   You boot off a diskette drive.  Again ...
  2076.  
  2077.                 o   You run a program.  It reads off a disk.  What was
  2078.                     actually read in?  How was it read in?  What did
  2079.                     the reading?
  2080.  
  2081.                 o   You compile a program.  Are you using any library
  2082.                     files?  What is in them?
  2083.  
  2084.                 o   When was the last time you looked at your
  2085.                     CONFIG.SYS?  AUTOEXEC.BAT?
  2086.  
  2087.                 o   You just bought a brand new program.  You just
  2088.                     brought it home from the store.  What do you know
  2089.                     about the program?  About the company that
  2090.                     produced it?
  2091.  
  2092.                 This list is not meant to be all-inclusive nor
  2093.                 thorough.  It is meant to be a spark to start
  2094.                 education.  Let us continue by examining each of these
  2095.                 cases.  (Where found, the symbol "(!)" is used to
  2096.                 designate a potential point of attack for viruses.)
  2097.  
  2098.  
  2099.  
  2100.  
  2101.                 When you turn on the power switch
  2102.  
  2103.  
  2104.                 Before we investigate the different cases above, we
  2105.                 examine the steps that occur when you first flip the
  2106.                 power switch of your IBM PC to the ON position.
  2107.  
  2108.  
  2109.           Appendix: Viral Infections in PC-DOS                      27
  2110.  
  2111.  
  2112.  
  2113.  
  2114.  
  2115.  
  2116.  
  2117.  
  2118.  
  2119.                 Power is given to the system.  A section of code known
  2120.                 as POST (Power On Self Test) residing in ROM (Read
  2121.                 Only Memory) starts running.  It checks memory,
  2122.                 devices, peripherals, and then transfers control to
  2123.                 any "properly signatured" ROMs found in the I/O
  2124.                 channels.  Assuming those pieces run smoothly, control
  2125.                 returns to POST.  When POST completes, it searches for
  2126.                 a diskette in the diskette drive.  If unsuccessful, it
  2127.                 tries to boot off a hard file.  And finally, if
  2128.                 neither works, it starts running the BASIC interpreter
  2129.                 which is found in its ROM.
  2130.  
  2131.                 The first place where programs are read into system
  2132.                 RAM (Random Access Memory) is the hard file or
  2133.                 diskette boot up process.  Until then, all the code
  2134.                 that is run has come from ROM.  Since these ROMs are
  2135.                 from trusted sources, we must assume that they have
  2136.                 not been created with viruses installed.  ROMs, by
  2137.                 their nature, can only be written by special
  2138.                 equipment, not found in your PC.  Thus to tamper with
  2139.                 them, they must be removed and/or replaced without
  2140.                 your knowledge.  For the purposes of this discussion,
  2141.                 we will assume that this has not happened.
  2142.  
  2143.  
  2144.  
  2145.                 Boot from hard file
  2146.  
  2147.  
  2148.                 When the computer boots off the hard file, it relies
  2149.                 on code which has been placed in two areas on the hard
  2150.                 file.  The first location is the master boot
  2151.                 record(!).  The master boot record contains code and
  2152.                 information to designate which "system boot record"(!)
  2153.                 to read and run.  This is the "active partition."
  2154.                 There are potentially many system boot records, one
  2155.                 for each partition, while there is only one master
  2156.                 boot record.
  2157.  
  2158.                 Boot records on a fixed disk vary.  But usually, up to
  2159.                 a whole track is reserved.  This is a large amount of
  2160.                 space, most of which is not normally used.  The large
  2161.                 empty space provides a potential area for viruses to
  2162.                 hide.
  2163.  
  2164.  
  2165.  
  2166.                 Boot from diskette
  2167.  
  2168.  
  2169.                 For a floppy disk, the boot record is a properly
  2170.                 "signatured" sector at head 0 track 0 sector 1 of the
  2171.                 disk(!).  If the machine finds a proper signature, it
  2172.                 takes the bytes stored in that sector and begins
  2173.  
  2174.  
  2175.           Appendix: Viral Infections in PC-DOS                      28
  2176.  
  2177.  
  2178.  
  2179.  
  2180.  
  2181.  
  2182.  
  2183.  
  2184.  
  2185.                 executing them.  This code is usually very short.
  2186.                 Usually, one of the first things it does is to tell
  2187.                 the machine where to get other sectors to form a
  2188.                 complete boot up program.
  2189.  
  2190.                 Viruses can hide parts of themselves on either hard or
  2191.                 floppy disks, in sectors that they mark as "bad."(!)
  2192.                 These sectors would require special commands to be
  2193.                 read.  This prevents the code from being accidentally
  2194.                 overwritten.  They also provide an obvious sign,
  2195.                 should you be looking for them (CHKDSK will report bad
  2196.                 sectors).
  2197.  
  2198.  
  2199.  
  2200.                 PC-DOS, the operating system
  2201.  
  2202.  
  2203.                 The purpose of the boot records is to load the
  2204.                 operating system.  This is done by loading files with
  2205.                 the names IBMBIO.COM(!), IBMDOS.COM(!), and
  2206.                 COMMAND.COM(!).  These files contain the operating
  2207.                 system.
  2208.  
  2209.                 After the operating system is loaded, it becomes the
  2210.                 integral portion of all system activities.  This
  2211.                 includes activities such as reading and writing
  2212.                 files(!), allocating memory(!), and allocating all
  2213.                 other system resources(!).  Few applications exist
  2214.                 that do not use the operating system to take advantage
  2215.                 of the system resources.  Thus, some viruses change
  2216.                 COMMAND.COM or intercept attempts to request a system
  2217.                 resource.
  2218.  
  2219.                 The purpose of such action would be two-fold.  The
  2220.                 first purpose is to place the virus in a common code
  2221.                 path, so that it is executed frequently so that it may
  2222.                 have ample opportunity to spread.  The second is to
  2223.                 cause damage, intercepting the proper request and
  2224.                 altering the request.
  2225.  
  2226.  
  2227.  
  2228.  
  2229.                 Running a program
  2230.  
  2231.  
  2232.                 What code runs when you run a program? (!)  (The
  2233.                 following list is not meant to be complete.  It is to
  2234.                 show you that any link could be a potential point of
  2235.                 attack for a virus.  Since the virus' purpose is to be
  2236.                 executed frequently, it would find itself executed
  2237.                 frequently enough if it resided in any of the
  2238.                 following areas.)
  2239.  
  2240.  
  2241.           Appendix: Viral Infections in PC-DOS                      29
  2242.  
  2243.  
  2244.  
  2245.  
  2246.  
  2247.  
  2248.  
  2249.  
  2250.  
  2251.                 o   DOS accepts your keystrokes.
  2252.  
  2253.                     -   BIOS INT 9H, INT 16H, INT 15H, INT 1BH
  2254.                     -   DOS INT 21H keyboard functions, INT 28H
  2255.                     -   Any keyboard device driver or TSR (Terminate
  2256.                         and Stay Resident) program.
  2257.  
  2258.                 o   DOS loads your program
  2259.  
  2260.                     -   BIOS INT 13H, INT 40H, INT 15H
  2261.                     -   DOS INT 21H file search functions, memory
  2262.                         allocation, set DTA, disk read, CTRL-BREAK
  2263.                         check, etc.
  2264.                     -   Any DOS extension driver or TSR (Terminate and
  2265.                         Stay Resident) program.
  2266.  
  2267.                 o   General background functions
  2268.  
  2269.                     -   BIOS INT 8 (timer), INT 0FH (printer), INT 1CH
  2270.                         (timer)
  2271.                     -   Any system driver or TSR (Terminate and Stay
  2272.                         Resident) program.
  2273.  
  2274.                 All these things happen and more, each time you run a
  2275.                 program.
  2276.  
  2277.  
  2278.  
  2279.                 CONFIG and AUTOEXEC
  2280.  
  2281.  
  2282.                 Every time you boot your system, CONFIG.SYS(!)  and
  2283.                 AUTOEXEC.BAT(!) tell the system to load many files and
  2284.                 options before you can start working on the computer.
  2285.                 If a virus decided to attach an extra line of
  2286.                 instruction to one of these files, it would result in
  2287.                 the program being loaded each day.  When was the last
  2288.                 time you looked at CONFIG.SYS?  AUTOEXEC.BAT?  Do you
  2289.                 remember the reason for the existence of each line in
  2290.                 the two files?
  2291.  
  2292.  
  2293.  
  2294.                 Compiling programs, using libraries
  2295.  
  2296.  
  2297.                 When you compile a program, you use several programs.
  2298.                 One is the compiler itself (!).  If the compiler is
  2299.                 infected with a virus, the virus may spread to other,
  2300.                 unrelated programs.  But it could also spread to the
  2301.                 program being compiled.
  2302.  
  2303.                 When a compiled program is linked to form an
  2304.                 executable program, it is common to link in programs
  2305.  
  2306.  
  2307.           Appendix: Viral Infections in PC-DOS                      30
  2308.  
  2309.  
  2310.  
  2311.  
  2312.  
  2313.  
  2314.  
  2315.  
  2316.  
  2317.                 from libraries(!).  These library programs provide
  2318.                 standard operating system interfaces, perform input
  2319.                 and output, and so on.  If one or more of the library
  2320.                 programs are infected with a virus, then every program
  2321.                 which is linked with it will be infected.
  2322.  
  2323.  
  2324.  
  2325.  
  2326.  
  2327.  
  2328.  
  2329.  
  2330.  
  2331.  
  2332.  
  2333.  
  2334.  
  2335.  
  2336.  
  2337.  
  2338.  
  2339.  
  2340.  
  2341.  
  2342.  
  2343.  
  2344.  
  2345.  
  2346.  
  2347.  
  2348.  
  2349.  
  2350.  
  2351.  
  2352.  
  2353.  
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.  
  2361.  
  2362.  
  2363.  
  2364.  
  2365.  
  2366.  
  2367.  
  2368.  
  2369.  
  2370.  
  2371.  
  2372.  
  2373.           Appendix: Viral Infections in PC-DOS                      31
  2374.  
  2375.  
  2376.  
  2377.